//未审核
$('.notAuditSpan').on('click',function(){
	var status = $(this).attr('status');
	$.ajax({
		type:"get",
		url:"/eshop/backEshop/backTransferRecordMore.html",
		dataType:'html',
		data:{
			'status':status
		},
		success:function(data){
			console.log(data);
			$('.record').html(data);
		},
	});
})
//已审核
$('.auditedSpan').on('click',function(){
	var status = $(this).attr('status');
	$.ajax({
		type:"get",
		url:"/eshop/backEshop/backTransferRecordMore.html",
		dataType:'html',
		data:{
			'status':status
		},
		success:function(data){
			console.log(data);
			$('.record').html(data);
		},
	});
})
//未审核
$('.completeSpan').on('click',function(){
	console.log('已完成');
	/*$.ajax({
		type:"get",
		url:"",
		dataType:'',
		data:{},
		async:true,
		success:function(res){
			
		},
		error:function(){
			console.log('ajax error!');
		}
	});*/
})
//删除记录
$('.auditDelete').on('click',function(){
	var result = confirm('确定删除这条记录吗？');
	if(result){
		var _this = this;
		var transferAuditId =  $(_this).parent().parent().attr('transferAuditId');
		$.ajax({
			type:"get",
			url:"/eshop/backEshop/deleteTransferRecord.json",
			dataType:'',
			data:{
				'transferAuditId':transferAuditId
			},
			success:function(data){
				if(data['code'] == 200){
					alert("删除成功！");
					$(_this).parent().parent().remove();
				}else if(data['code'] == -200){
					alert(data['mesesag']);
				}
			},
		});
	}
})
//充值
$(document).on('click','.auditRecharge',function(){
	var _this = this;
	var transferAuditId =  $(_this).parent().parent().attr('transferAuditId');
	$('#transferAuditId').val(transferAuditId);
	$('.modelBg').show();
	$('.agentListShopInfoBox').show();
	$('html,body').css('overflow','hidden');
})
//取消
$('.agentListShopInfoBoxBtnCancel').on('click',function(){
	$('.modelBg').hide();
	$('.agentListShopInfoBox').hide();
	$('html,body').css('overflow-y','scroll');
})
//确定
$('.agentListShopInfoBoxBtnSubmit').on('click',function(){
	$('form[name=postMessage]').submit();
	/*$('.modelBg').hide();
	$('.agentListShopInfoBox').hide();
	$('html,body').css('overflow-y','scroll');*/
})


//分页
 var pageCount=$(".pageCount").val();
$(".tcdPageCode").createPage({
    pageCount:pageCount,
    current:$('.pageNo').val(),
    backFn:function(p){
    	window.location.href="/eshop/backEshop/agentList.htm?pageNo="+p;
        }
 });